package com.example.configclient.controller;

import com.example.configclient.ConfigProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Create by jian.pan on 2018/6/20
 */
@RestController
@RequestMapping("config")
public class ConfigController {

  @Autowired
  private ConfigProperties configProperties;


  @GetMapping("")
  public String test(){
    return configProperties.getAppName()+"....."+configProperties.getAppVersion();
  }
}
